#include<bits/stdc++.h>
using namespace std;
const int mod=1e9+7;
const int N=1e5+3;
using ll =long long;
ll n,a,b;
ll f[N];
ll dp[N];
ll ksm(ll x,ll k){
	ll res=1;
	while(k){
		if(k&1)res=(x*res)%mod;
		x=(x*x)%mod;k>>=1;
	}
	return res%mod;
}
ll c(ll x,ll y){
	return (f[x]%mod*ksm(f[x-y]*f[y],mod-2)%mod)%mod;
}

int main(){
	f[0]=1;
	for(int i=1;i<=N;i++){
		f[i]=(i*f[i-1])%mod;
    }
	cin>>n>>a>>b;
	ll ans=0;
	dp[0]=ksm(a,n)%mod;
	for(int i=1;i<=n;i++){
		dp[i]=(dp[i-1]%mod*(n-i+1)*ksm(a*(i),mod-2)%mod)%mod;
	}
	//cout<<dp[0]<<" "<<dp[1]<<endl;
	for(int i=b;i<=n;i++){
		if((i-b+1)&1){
			ans=(ans+dp[i]%mod)%mod;
		}else{
			ans=(ans-dp[i]%mod+mod)%mod;
		} 
	}
	cout<<ans;
	return 0; 
}
